import java.util.Scanner;

/**
 * 项目名称：wangxu
 * 类 名 称：HJ29
 * 描 述：HJ29 字符串加解密
 * 创建时间：2023/3/21 3:10 下午
 * 创 建 人：wang-xu
 */
public class HJ29 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()){
            String pwd = in.next();
            String dPwd = in.next();
            enCode(pwd);
            deCode(dPwd);
        }
    }

    private static void deCode(String dPwd) {
        char[] pwds = dPwd.toCharArray();
        StringBuilder sb = new StringBuilder();
        for (char c:pwds) {
            // 数字判断
            if (c>='0' && c<='9'){
                if (c=='0'){
                    sb.append('9');
                    continue;
                }
                c = (char) (c-1);
                sb.append(c);
            }
            // 小写字母判断
            if (c>='a' && c<='z'){
                if (c=='a'){
                    sb.append('Z');
                    continue;
                }
                c = (char) (c-1);
                sb.append(String.valueOf(c).toUpperCase());
            }
            // 大写字母判断
            if (c>='A' && c<='Z'){
                if (c=='A'){
                    sb.append('z');
                    continue;
                }
                c = (char) (c-1);
                sb.append(String.valueOf(c).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }

    private static void enCode(String pwd){
        char[] pwds = pwd.toCharArray();
        StringBuilder sb = new StringBuilder();
        for (char c:pwds) {
            // 数字判断
            if (c>='0' && c<='9'){
                if (c=='9'){
                    sb.append('0');
                    continue;
                }
                c = (char) (c+1);
                sb.append(c);
            }
            // 小写字母判断
            if (c>='a' && c<='z'){
                if (c =='z'){
                    sb.append('A');
                    continue;
                }
                c = (char) (c+1);
                sb.append(String.valueOf(c).toUpperCase());
            }
            // 大写字母判断
            if (c >='A' && c<='Z'){
                if (c=='Z'){
                    sb.append('a');
                    continue;
                }
                c = (char) (c+1);
                sb.append(String.valueOf(c).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
}
